package com.ja.openchat.views.bubble;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.ja.openchat.R;
import com.lqr.emoji.EmojiManager;

import java.util.List;

public class MessageHandleEmojiAdapter extends BaseQuickAdapter<Integer, BaseViewHolder> {

    public MessageHandleEmojiAdapter(@Nullable List<Integer> data) {
        super(R.layout.item_message_handle_emoji_view, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, Integer entry) {
        ImageView emojiImage = baseViewHolder.getView(R.id.emojiImage);
        emojiImage.setImageDrawable(EmojiManager.getDrawable(getContext(),entry));
    }
}
